<?php

    include './Conexao.php';
    $salMaq = new SIAPU_Equacoes();
    $formata = new SIAPU_Conversoes();
    $datas = new SIAPU_Datas();

    $formata->preparaFloat($salMaq->setVmi_vlInicialAquisicao($_GET['Vmi']));
    $formata->preparaFloat($salMaq->setEm_espacoOcupado($_GET['Em']));
    $formata->preparaFloat($salMaq->setH_nrHorasTrabalho($_GET['H']));
    $formata->preparaFloat($salMaq->setKe_custoMetroQuadrado($_GET['Ke']));
    $formata->preparaFloat($salMaq->setKmc_custoManutencaoAnual($_GET['Kmc']));
    
    $formata->preparaFloat($salMaq->setJ_TaxaJurosAnual(($_GET['j'])/100));
    
    $salMaq->setM_vidaPrevista($_GET['M']);
    $salMaq->setM_idadeMaquina($datas->timeleft($datas->cvdate($_GET['dtAquisicao']),$datas->cvdate($datas->data(3)),TRUE));
    
    echo $formata->preparaFloat($formata->preparaReal($salMaq->SM()));
?>
